# -*- coding: UTF-8 -*-

import time,os
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.chrome.options import Options

# chrome=Options()
# chrome.add_experimental_option("debuggerAddress", "127.0.0.1:9222")
# chrome_driver = r"D:\Programs\Python\Python37\chromedriver.exe"   ##驱动对应地址
path = os.path.join("file:///", os.getcwd(), "selenium.html")

print(path)
def aler():
    # driver=webdriver.Chrome(chrome_driver,chrome_options=chrome)
    driver=webdriver.Chrome()
    driver.get(path)
    driver.maximize_window()
    time.sleep(3)
    uplo=driver.find_element_by_css_selector("div#signup input[name='upload']")
    file="C:\\Users\\EDZ\\Desktop\\tp\\timg.jpg"
    uplo.send_keys(file)
    ti=driver.find_element_by_css_selector("div#signup input[type='submit']")
    ti.click()
    driver.quit()

aler()